﻿@using System.Globalization
@using Abp.Configuration.Startup
@using Abp.Web.Security.AntiForgery
@using ZLJ
@using ZLJ.Web.Resources
@inject ZLJ.Timing.AppTimes AppTimes
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IWebResourceManager WebResourceManager
@inject ILanguageManager LanguageManager
@inject IMultiTenancyConfig MultiTenancyConfig
@{
    Layout = null;
    AbpAntiForgeryManager.SetCookie(Context);

    var pageTitle = !string.IsNullOrWhiteSpace(ViewBag.Title) ? ViewBag.Title + " / " : "";
    pageTitle += "ZLJ";
}
<!DOCTYPE html>
<html lang="@LanguageManager.CurrentLanguage.Name">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <title>@pageTitle</title>

    <link rel="shortcut icon" href="~/img/favicon.ico">
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

    <environment names="Development">
        <link href="~/libs/font-awesome/css/all.css" rel="stylesheet" asp-append-version="true" />
        <link href="~/libs-ext/famfamfam-flags/dist/sprite/famfamfam-flags.min.css" rel="stylesheet" asp-append-version="true" />
        <link href="~/libs/icheck-bootstrap/icheck-bootstrap.css" rel="stylesheet" asp-append-version="true" />
        <link href="~/libs/toastr/toastr.css" rel="stylesheet" asp-append-version="true" />
        <link href="~/libs/animate.css/animate.css" rel="stylesheet" asp-append-version="true" />
        <link href="~/libs/admin-lte/dist/css/adminlte.css" rel="stylesheet" asp-append-version="true" />
        <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
        <link href="~/view-resources/Views/Account/_Layout.css" rel="stylesheet" asp-append-version="true" />
    </environment>

    <environment names="Staging,Production">
        <link rel="stylesheet" href="~/view-resources/Views/_Bundles/account-layout.min.css" asp-append-version="true" />
    </environment>

    @RenderSection("styles", required: false)
</head>
<body class="hold-transition login-page">
    <div class="login-box">
        <div class="login-logo">
            <a href="/"><b>ZLJ</b></a>
        </div>
        <div class="card">
            @if (MultiTenancyConfig.IsEnabled)
            {
                <div class="card-header">
                    <vc:tenant-change></vc:tenant-change>
                </div>
            }
            <div class="card-body login-card-body">
                @RenderBody()
            </div>
            <div class="card-footer">
                <vc:account-languages></vc:account-languages>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12 text-center">
                <small>&copy; @DateTime.Now.Year ZLJ. <b>Version </b> @AppVersionHelper.Version [@AppVersionHelper.ReleaseDate.ToString("yyyyMMdd")]</small>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        // This is used to get the application's root path from javascript.
        // It's useful if you're running application in a virtual directory under IIS.
        var abp = abp || {};
        abp.appPath = '@ApplicationPath';
    </script>
    <environment names="Development">
        <script src="~/libs/jquery/jquery.js" asp-append-version="true"></script>
        <script src="~/libs/bootstrap/dist/js/bootstrap.bundle.js" asp-append-version="true"></script>
        <script src="~/libs/admin-lte/dist/js/adminlte.js" asp-append-version="true"></script>
        <script src="~/libs/jquery-validate/jquery.validate.js" asp-append-version="true"></script>
        <script src="~/libs/jquery-validate/jquery.validate.unobtrusive.js" asp-append-version="true"></script>
        <script src="~/libs/toastr/toastr.min.js" asp-append-version="true"></script>
        <script src="~/libs/block-ui/jquery.blockUI.js" asp-append-version="true"></script>
        <script src="~/libs/spin/spin.js" asp-append-version="true"></script>
        <script src="~/libs-ext/spin/jquery.spin.js" asp-append-version="true"></script>
        <script src="~/libs/sweetalert/sweetalert.min.js" asp-append-version="true"></script>
        <script src="~/libs/moment/moment-with-locales.js" asp-append-version="true"></script>
        <script src="~/libs/abp-web-resources/Abp/Framework/scripts/abp.js" asp-append-version="true"></script>
        <script src="~/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js" asp-append-version="true"></script>
        <script src="~/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.toastr.js" asp-append-version="true"></script>
        <script src="~/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.blockUI.js" asp-append-version="true"></script>
        <script src="~/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js" asp-append-version="true"></script>
        <script src="~/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js" asp-append-version="true"></script>
        <script src="~/js/main.js" asp-append-version="true"></script>
    </environment>

    <environment names="Staging,Production">
        <script src="~/view-resources/Views/_Bundles/account-layout.min.js" asp-append-version="true"></script>
    </environment>
    
    @if (CultureInfo.CurrentUICulture.Name != "en")
    {
        <script src="~/libs/jquery-validate/localization/messages_@Html.Raw(CultureInfo.CurrentUICulture.Name.Replace("-", "_") + ".js")" asp-append-version="true"></script>
    }

    <script type="text/javascript">
        // Localizing momentjs
        moment.locale('@CultureInfo.CurrentUICulture.Name');
    </script>

    <!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
    <script src="~/AbpServiceProxies/GetAll?v=@(AppTimes.StartupTime.Ticks)" type="text/javascript"></script>
    <script src="~/AbpScripts/GetScripts?v=@(AppTimes.StartupTime.Ticks)" type="text/javascript"></script>

    @WebResourceManager.RenderScripts()
    @RenderSection("scripts", required: false)
</body>
</html>
